

# Uncomment this line to define a global platform for your project
# 如果项目中需要用到一个workspace含多个project 公用一个podfile, 直接拷贝此文件放在跟workspace文件同目录 然后修改即可
# 最后执行 pod update
#source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'
workspace 'bytedesk'

source 'https://github.com/CocoaPods/Specs.git'

target 'demo' do
    # Comment this line if you're not using Swift and don't want to use dynamic frameworks
    use_frameworks!
#
    project 'demo/demo.xcodeproj'
    
    pod 'FMDB', '~> 2.7.5'
    #    pod 'WCDB', '~> 1.0.7.5'
#    pod 'MMKV', '~> 1.2.4'
    pod 'Protobuf', '~> 3.19.4'
#    pod 'MQTTClient', '~> 0.15.3'
#    pod 'MQTTClient/Websocket', '~> 0.15.3'
    pod 'SJVideoPlayer'
    
#    pod 'SocketRocket'
    pod 'AFNetworking', '~> 4.0.1'
    pod 'CocoaLumberjack', '~> 3.7.4'

    pod 'QMUIKit', '~> 4.4.3'
    pod 'MGSwipeTableCell', '~> 1.6.11'
    pod 'M80AttributedLabel', '~> 1.9.9'
    pod 'HCSStarRatingView', '~> 1.5'
    pod 'SDAutoLayout', '~> 2.2.1'

    # 集成核心协议库core
    pod 'bytedesk-core', '2.6.0'

    # 集成UI界面库
#   第一种集成方式：将bdui项目集成到自己项目中，并添加依赖，可自定义界面
#   参考文档 https://github.com/Bytedesk/bytedesk-ios/wiki/5%E5%88%86%E9%92%9F%E9%9B%86%E6%88%90%E8%87%AA%E5%AE%9A%E4%B9%89UI

#   第二种集成方式：直接使用pod
#    pod 'bytedesk-ui', '2.6.0'

end



target 'bytedesk-ui' do
    # Comment this line if you're not using Swift and don't want to use dynamic frameworks
    use_frameworks!

    project 'bdui/bdui.xcodeproj'

    # Pods for bdui
    pod 'FMDB', '~> 2.7.5'
#    pod 'WCDB', '~> 1.0.7.5'
#    pod 'MMKV', '~> 1.2.4'
    pod 'Protobuf', '~> 3.19.4'
    
#    pod 'MQTTClient', '~> 0.15.3'
#    pod 'MQTTClient/Websocket', '~> 0.15.3'
    pod 'SJVideoPlayer'
#    pod 'SocketRocket'

    pod 'AFNetworking', '~> 4.0.1'
    pod 'CocoaLumberjack', '~> 3.7.4'

    pod 'QMUIKit', '~> 4.4.3'
    pod 'M80AttributedLabel', '~> 1.9.9'
    pod 'HCSStarRatingView', '~> 1.5'
    
    # 集成核心协议库core
    pod 'bytedesk-core', '2.6.0'

    target 'bduiTests' do
    end

end


# 支持bitcode
#bitcode enable
post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
            config.build_settings['ENABLE_BITCODE'] = 'YES'
            
            if config.name == 'Release'
                config.build_settings['BITCODE_GENERATION_MODE'] = 'bitcode'
                else
                config.build_settings['BITCODE_GENERATION_MODE'] = 'marker'
            end
            
            cflags = config.build_settings['OTHER_CFLAGS'] || ['$(inherited)']
            
            if config.name == 'Release'
                cflags << '-fembed-bitcode'
                else
                cflags << '-fembed-bitcode-marker'
            end
            
            config.build_settings['OTHER_CFLAGS'] = cflags
        end
    end
end


